﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////

#pragma once
#include "GmFamilyService.h"
#include "IFamilyGeneralForm.h"

namespace gcmp
{
    class  Coordinate3d;
}

namespace gfam
{
    class IFamilySketch2D;

    ///\brief 斜拉伸体
    class GM_FAMILY_SERVICE_EXPORT IFamilySlopedExtrusion : public IFamilyGeneralForm
    {
        DEFINE_CAST_DERIVED(gfam::IFamilySlopedExtrusion, gfam::IFamilyGeneralForm)

    public:
        /// \brief 获取截面草图
        ///
        /// \return 截面草图
        virtual const IFamilySketch2D* GetSectionSketch() const = 0;

        /// \brief 获取截面草图
        ///
        /// \return 截面草图
        virtual IFamilySketch2D* GetSectionSketch()= 0;

        /// \brief 创建斜拉伸体
        /// 
        /// \param pDocument 文档
        /// \param profileCoord 轮廓坐标系
        /// \param sketchId 草图id
        /// \param sectionAngleAroundProfileCoordZ z轴倾斜角度
        /// \param sectionAngleAroundProfileCoordX x轴倾斜角度
        /// \param startOffset 起始高度
        /// \param endOffset 终止高度
        /// \return 融合体
        static IFamilySlopedExtrusion* Create(gcmp::IDocument* pDocument, const gcmp::Coordinate3d& profileCoord, const gcmp::ElementId& sketchId,
            double sectionAngleAroundProfileCoordZ, double sectionAngleAroundProfileCoordX, double startOffset, double endOffset);

        /// \brief 获取起始高度
        /// 
        /// \return 起始高度
        virtual double GetStartOffset() const = 0;

        /// \brief 设置起始高度
        /// 
        /// \param startOffset 起始高度
        /// \return 设置成功返回true,失败返回false
        virtual bool SetStartOffset(double startOffset) = 0;

        /// \brief 获取融合体的终止高度
        /// 
        /// \return 终止高度
        virtual double GetEndOffset() const = 0;

        /// \brief 设置终止高度
        /// 
        /// \param endOffset 终止高度
        /// \return 设置成功返回true,失败返回false
        virtual bool SetEndOffset(double endOffset) = 0;

        /// \brief 获取轮廓坐标系
        /// 
        /// \return 轮廓坐标系
        virtual gcmp::Coordinate3d GetProfileCoord() const = 0;

        /// \brief 获取轮廓草图id
        /// 
        /// \return 轮廓草图id
        virtual gcmp::ElementId GetSectionSketchId() const = 0;

    };

} 
